﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;
using System.Runtime.Serialization;

namespace YasharEl.Infrastructure.Core.Personification
{
    [Serializable]
    public class InvalidIsraelIdentityNumberException : DomainModelException
    {
        private readonly string _givenIsraelIdentityNumber;

        public string InvalidIdentityNumber
        {
            get { return _givenIsraelIdentityNumber; }
        }

        public InvalidIsraelIdentityNumberException(string israelIdentityNumber)
            : base(string.Format("Could not recognize the given string {0} as valid israel identity number.", israelIdentityNumber))
        {
            _givenIsraelIdentityNumber = israelIdentityNumber;
        }

        protected InvalidIsraelIdentityNumberException(SerializationInfo info, StreamingContext context) :
            base(info, context)
        {
        }
    }
}
